<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>The Evolution of Finger: a web frontend</title>
  </head>
<body>

<h1>The Evolution of Finger: a web frontend</h1>

<h2>Introduction</h2>

<p> This is the sixth part of the Twisted tutorial <a
href="index.xhtml">Twisted from Scratch, or The Evolution of Finger</a>.</p>

<p>In this part, we demonstrate adding a web frontend using simple <code
class="API">twisted.web.resource.Resource</code> objects: <code
class="python">UserStatusTree</code>, which will produce a listing of all
users at the base URL (<code>/</code>) of our site; <code
class="python">UserStatus</code>, which gives the status of each user at the
locaton <code>/username</code>; and <code class="python">UserStatusXR</code>,
which exposes an XMLRPC interface to <code class="python">getUser</code> and
<code class="python">getUsers</code> functions at the URL <code>/RPC2</code>.</p>

<p>In this example we construct HTML segments manually. If the web interface
was less trivial, we would want to use more sophisticated web templating and
design our system so that HTML rendering and logic were clearly separated.</p>

<a href="listings/finger/finger20.py" class="py-listing">finger20.py</a>

</body>
</html>
